import React, { Component } from 'react'
import index from './index.module.css'

export default class Navbar extends Component {
    onKeyUp = (e) => {
        if (e.keyCode === 13) {
            this.props.addTodos(e.target.value)
            e.target.value = ""
        }
        
    }
    render() {
        return <input className={index.navbar} onKeyUp={this.onKeyUp} />
    }
}
